package cate.common.table.pvp.guildwar.sheet;


import cate.common.table.ESheet;
import cate.common.table.pvp.guildwar.row.GuildWarRankRow;
import easy.java.dev.note.NoteClass;

@NoteClass("段位")
public class GuildWarRankSheet extends ESheet<GuildWarRankRow> {

    @Override
    public String getSheetName() {
        return "段位";
    }

    @Override
    protected GuildWarRankRow buildRow() {
        return new GuildWarRankRow();
    }

    public GuildWarRankRow findRank(int point) {
        for (GuildWarRankRow row : this.getList()) {
            if (point >= row.begin && point <= row.end) {
                return row;
            }
        }
        return null;
    }
}
